package com.dycc.main_componet.view.impl.fragment;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
import com.dycc.libary.base.BaseFragment;
import com.dycc.main_componet.R;
import com.dycc.main_componet.R2;

import butterknife.BindView;
import jp.wasabeef.glide.transformations.BlurTransformation;
import jp.wasabeef.glide.transformations.CropCircleTransformation;

/**
 * 个人中心
 * create by wxk
 */
@Route(path = "/main_c/fragment/Main_CMineFragment",name = "个人中心")
public class Main_CMineFragment extends BaseFragment {

    @BindView(R2.id.iv_blur)
    ImageView ivBlur;
    @BindView(R2.id.iv_avatar)
    ImageView ivAvatar;

    public static Main_CMineFragment newInstance() {
        Main_CMineFragment fragment = new Main_CMineFragment();
        return fragment;
    }

    @Override
    protected int getLayoutId() {
        return R.layout.fragment_main__cmine;
    }

    @Override
    protected void initView(View view, Bundle savedInstanceState) {
        Glide.with(this).load(R.drawable.bg)
                .bitmapTransform(new BlurTransformation(getActivity(), 25), new CenterCrop(getActivity()))
                .into(ivBlur);

        Glide.with(this).load(R.drawable.bg)
                .bitmapTransform(new CropCircleTransformation(getActivity()))
                .into(ivAvatar);
    }

    @Override
    protected void initData() {

    }
}
